package com.extendsdemo2;

/**
 * @Auther: shiquan
 * @Date: 2024/10/20 - 10 - 20 -16:40
 */

//父类  找公共的地方
public class Employee {
    //类名见名如意

    //所有成员变量豆=都需要私有


    //构造方法(空参  带全部参数的构造)
    //get  set

    private String id;
    private String name;
    private double salary;

    public Employee() {
    }

    public Employee(String id, String name, double salary) {
        this.id = id;
        this.name = name;
        this.salary = salary;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    //工作
    public void work(){
        System.out.println("员工在工作");
    }

    //吃饭
    public void eat(){
        System.out.println("吃米饭");
    }
}
